-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix upload snowball objects with staging file #1286
Fix upload snowball objects with staging file #1286
Conversation
Variable length must be set for method fput_object not to use multipart.
tests/functional/tests.py
Outdated
@@ -1891,6 +1891,32 @@ def test_upload_snowball_objects(log_entry): | |||
_CLIENT.remove_object(bucket_name, "my-object3") | |||
_CLIENT.remove_bucket(bucket_name) | |||
|
|||
# run with staging file option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have def _test_upload_snowball_objects(log_entry, staging_filename):
and use the method to have two tests named test_upload_snowball_objects()
and test_upload_snowball_objects_staging_file
to avoid code duplication.
tests/functional/tests.py
Outdated
mod_time=datetime.now(), | ||
), | ||
], | ||
staging_filename="staging.tar" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use random filename here like f"{uuid4()}.tar"
tests/functional/tests.py
Outdated
_test_upload_snowball_objects(log_entry) | ||
|
||
|
||
def test_upload_snowball_objects_with_staging(log_entry): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add in-line comment # pylint: disable=invalid-name
to ignore this pylint error.
There is a bug in upload_snowball_objects when it is called with "staging_filename" parameter. The variable "length" passed to fput_object is not defined in this case.